from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
from conan.tools.files import get
from conan.tools.scm import Git
from conan.tools.files import copy


class MyProjectConan(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps",
    default_options = {
        # "fmt/*:shared": False
    }

    def requirements(self):
        self.requires("workflow/0.11.4")
        self.requires("libuuid/1.0.3")
        self.requires("sqlitecpp/3.3.1")
        self.requires("fmt/10.2.0")
        self.requires("toml11/3.8.1")
        self.requires("handy/0.2.0")
        self.requires("zlib/1.2.11")
        self.requires("paho-mqtt-cpp/1.3.2")
        self.requires("nlohmann_json/3.11.3")
        self.requires("pcl/1.13.1")
        self.requires("glog/0.6.0")

    def build_requirements(self):
        self.tool_requires("ninja/1.12.1")

    def layout(self):
        cmake_layout(self)

    def generate(self):
        tc = CMakeToolchain(self)
        tc.generate()

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()
